Find number of elements smaller than given value in Sorted Matrix